package work01;

import java.util.ArrayList;
import java.util.Objects;
import java.util.Scanner;

public class work03countNumberOccurrences {
    public static void main(String[] args) {
        ArrayList <Integer> list1 = new ArrayList <Integer>();
        int count =1;
        Scanner sc = new Scanner(System.in);
        int m,n ;
        m = 0;
        do {
            n = sc.nextInt();
            if (n == 0){
                break;
            }
            list1.add(n);

        }while (true);
        for (int i = 0; i < list1.size(); i++) {

            for (int j = i+1; j < list1.size(); j++) {
                m = j;
                if (Objects.equals(list1.get(i), list1.get(j))){
                    count++;
                    list1.remove(j);
                    j=j-1;
                }
            }
            if (m == list1.size()|| m == list1.size()-1){
                System.out.println(list1.get(i)+":"+count+"个");
            }

            count = 1;
        }
    }
}
